package edu.zut.cs.javaee.manager.admin.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.zut.cs.javaee.manager.base.domain.BaseTreeEntity;
/**
 *  entity class for GroupManager
 * @author Is.f
 *
 */
@Table(name = "T_ADMIN_MANAGER")
@Entity
@NamedQueries({ @NamedQuery(name = "Manager.getRoot", query = "select s from Manager s  ") })


public class Manager extends BaseTreeEntity<Manager, Long> {

	/**
	 * Parent
	 * 1->n
	 */
	private static final long serialVersionUID = -4384256024490422653L;
	
	@Column
	String manager_name;
	/**
	 * name for manager
	 */
	@Column
	String manager_code;
	/**
	 * code for manager
	 */
	
	@OneToMany(mappedBy = "manager", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	List<GroupManager>groupmanagers;
	
	public String getManager_name() {
		return manager_name;
	}
	public void setManager_name(String manager_name) {
		this.manager_name = manager_name;
	}
	public String getManager_code() {
		return manager_code;
	}
	public void setManager_code(String manager_code) {
		this.manager_code = manager_code;
	}
}
